Initialize a new Specify project. Project files are scaffolded from assets bundled inside the specify-cli package, so initialization does not need network access and templates match the installed CLI version. This command will: 1. Check that require
(
project_name: str = typer.Argument(
None,
help="Name for your new project directory (optional if using --here, or use '.' for current directory)",
),
script_type: str = typer.Option(
None, "--script", help="Script type to use: sh or ps"
),
ignore_agent_tools: bool = typer.Option(
False,
"--ignore-agent-tools",
help="Skip checks for coding agent tools like Claude Code",
),
here: bool = typer.Option(
False,
"--here",
help="Initialize project in the current directory instead of creating a new one",
),
force: bool = typer.Option(
False,
"--force",
help="Force merge/overwrite when using --here (skip confirmation)",
),
skip_tls: bool = typer.Option(
False,
"--skip-tls",
help="Deprecated (no-op). Previously: skip SSL/TLS verification.",
hidden=True,
),
debug: bool = typer.Option(
False,
"--debug",
help="Deprecated. Previously: show verbose diagnostic output; currently only prints additional diagnostic details on failure.",
hidden=True,
),
github_token: str = typer.Option(
None,
"--github-token",
help="Deprecated (no-op). Previously: GitHub token for API requests.",
hidden=True,
),
offline: bool = typer.Option(
False,
"--offline",
help="Deprecated (no-op). All scaffolding now uses bundled assets.",
hidden=True,
),
preset: str = typer.Option(
None,
"--preset",
help="Install a preset during initialization (by preset ID)",
),
integration: str = typer.Option(
None,
"--integration",
help="AI coding agent integration to use (e.g. --integration copilot). See 'specify check' for available integrations.",
),
integration_options: str = typer.Option(
None,
"--integration-options",
help='Options for the integration (e.g. --integration-options="--commands-dir .myagent/cmds")',
),
)
| 72 | def register(app: typer.Typer) -> None: |
| 73 | @app.command() |
| 74 | def init( |
| 75 | project_name: str = typer.Argument( |
| 76 | None, |
| 77 | help="Name for your new project directory (optional if using --here, or use '.' for current directory)", |
| 78 | ), |
| 79 | script_type: str = typer.Option( |
| 80 | None, "--script", help="Script type to use: sh or ps" |
| 81 | ), |
| 82 | ignore_agent_tools: bool = typer.Option( |
| 83 | False, |
| 84 | "--ignore-agent-tools", |
| 85 | help="Skip checks for coding agent tools like Claude Code", |
| 86 | ), |
| 87 | here: bool = typer.Option( |
| 88 | False, |
| 89 | "--here", |
| 90 | help="Initialize project in the current directory instead of creating a new one", |
| 91 | ), |
| 92 | force: bool = typer.Option( |
| 93 | False, |
| 94 | "--force", |
| 95 | help="Force merge/overwrite when using --here (skip confirmation)", |
| 96 | ), |
| 97 | skip_tls: bool = typer.Option( |
| 98 | False, |
| 99 | "--skip-tls", |
| 100 | help="Deprecated (no-op). Previously: skip SSL/TLS verification.", |
| 101 | hidden=True, |
| 102 | ), |
| 103 | debug: bool = typer.Option( |
| 104 | False, |
| 105 | "--debug", |
| 106 | help="Deprecated. Previously: show verbose diagnostic output; currently only prints additional diagnostic details on failure.", |
| 107 | hidden=True, |
| 108 | ), |
| 109 | github_token: str = typer.Option( |
| 110 | None, |
| 111 | "--github-token", |
| 112 | help="Deprecated (no-op). Previously: GitHub token for API requests.", |
| 113 | hidden=True, |
| 114 | ), |
| 115 | offline: bool = typer.Option( |
| 116 | False, |
| 117 | "--offline", |
| 118 | help="Deprecated (no-op). All scaffolding now uses bundled assets.", |
| 119 | hidden=True, |
| 120 | ), |
| 121 | preset: str = typer.Option( |
| 122 | None, |
| 123 | "--preset", |
| 124 | help="Install a preset during initialization (by preset ID)", |
| 125 | ), |
| 126 | integration: str = typer.Option( |
| 127 | None, |
| 128 | "--integration", |
| 129 | help="AI coding agent integration to use (e.g. --integration copilot). See 'specify check' for available integrations.", |
| 130 | ), |
| 131 | integration_options: str = typer.Option( |
nothing calls this directly
no test coverage detected