asc init
asc init writes ASC.md, a command reference for asc, into the current repository and can point AGENTS.md and CLAUDE.md at it.
asc init writes ASC.md, a command reference for the asc command line, into the repository you run it in. It needs no Apple team and changes only local files. asc docs init (see asc docs) does exactly the same.
asc init [--path PATH] [--force] [--link=false]| Flag | What it does | Default |
|---|---|---|
--path |
Where to write ASC.md: a folder, or a file path ending in ASC.md. |
ASC.md at the root of the Git repository you are in, or in the current folder outside a repository |
--force |
Overwrite an existing ASC.md. Without it, an existing file is left alone and the command fails. |
false |
--link |
Add a reference to ASC.md to AGENTS.md (or Agents.md) and CLAUDE.md at the root of the Git repository, or in the folder of ASC.md outside a repository. Only files that already exist are changed; neither file is created, and a file that already has the reference is left as it is. |
true |
No flag is required. --link is on by default; turn it off with --link=false.
What it writes
| File | Change |
|---|---|
ASC.md |
Created, or replaced with --force. The text is the guide asc docs show reference prints, so it matches the installed asc. |
AGENTS.md, CLAUDE.md |
With --link (the default), a short reference to ASC.md is added to each one that exists. |
When it is done it prints a receipt on stdout, always as JSON (there is no --output flag): path (the file written), created, overwritten and, when it changed them, linked (the files it added the reference to). Run asc init --force again after updating asc to refresh the file.
Errors
asc docs init prints the same messages with docs init: in front.
| Message | Exit | What to do |
|---|---|---|
init: ASC.md already exists: PATH (use --force to overwrite) |
1 | Keep the file, or run again with --force to replace it. |
init: path must target ASC.md or a directory: PATH[ is not a directory or markdown file] |
1 | Point --path at a folder or at a file named ASC.md. |
Examples
asc init
asc init --path ./ASC.md
asc init --force --link=false