Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
- wrap command actions in try-catch with `handleError(error, "Failed to <action>")`
- errors display clean messages to stderr with ✗ prefix, stack traces only shown when `LINEAR_DEBUG=1`

## cli flags

- never use the same short flag alias (e.g. `-w`) on both a global option and a command-level option — cliffy resolves global options first, so the command-level alias will be shadowed
- before adding a short flag, grep the codebase for that letter to ensure it's not already in use at a conflicting scope

## tests

- tests on commands should mirror the directory structure of the src, e.g.
Expand Down
8 changes: 4 additions & 4 deletions docs/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ the CLI supports multiple authentication methods with the following precedence:
1. `--api-key` flag (explicit key for single command)
2. `LINEAR_API_KEY` environment variable
3. `api_key` in project `.linear.toml` config
4. `--workspace` / `-w` flag → stored credentials lookup
4. `--workspace` flag → stored credentials lookup
5. project's `workspace` config → stored credentials lookup
6. default workspace from stored credentials

Expand Down Expand Up @@ -61,9 +61,9 @@ the `*` indicates the default workspace.
# set a new default
linear auth default side-project

# or use -w flag for a single command
linear -w side-project issue list
linear -w acme issue create --title "Bug fix"
# or use --workspace flag for a single command
linear --workspace side-project issue list
linear --workspace acme issue create --title "Bug fix"
```

### credentials file format
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Environment Variables:
LINEAR_DEBUG=1 Show full error details including stack traces`,
)
.globalOption(
"-w, --workspace <slug:string>",
"--workspace <slug:string>",
"Target workspace (uses credentials)",
)
.globalAction((options) => {
Expand Down
Loading