@dabble/linear-cli 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -43,8 +43,7 @@ linear issue update ISSUE-1 --append "Found the root cause..."
43
43
 
44
44
  ### Authentication
45
45
  ```bash
46
- linear login # Interactive setup, saves to ./.linear
47
- linear login --global # Save to ~/.linear instead
46
+ linear login # Interactive setup (prompts for location)
48
47
  linear logout # Remove config
49
48
  linear whoami # Show current user and team
50
49
  ```
package/bin/linear.mjs CHANGED
@@ -55,11 +55,6 @@ function loadConfig() {
55
55
  // Fall back to env vars if not set by config file
56
56
  if (!LINEAR_API_KEY) LINEAR_API_KEY = process.env.LINEAR_API_KEY || '';
57
57
  if (!TEAM_KEY) TEAM_KEY = process.env.LINEAR_TEAM || '';
58
-
59
- if (!LINEAR_API_KEY || !TEAM_KEY) {
60
- console.error(colors.red("Error: No config file found or missing API key or team key. Run 'linear login' first."));
61
- process.exit(1);
62
- }
63
58
  }
64
59
 
65
60
  function checkAuth() {
@@ -1684,17 +1679,26 @@ async function cmdStandup(args) {
1684
1679
  // ============================================================================
1685
1680
 
1686
1681
  async function cmdLogin(args) {
1687
- const opts = parseArgs(args, { global: 'boolean', g: 'boolean' });
1688
- const saveGlobal = opts.global || opts.g;
1689
-
1690
1682
  console.log(colors.bold('Linear CLI Login\n'));
1691
- console.log('Opening Linear API settings in your browser...');
1683
+
1684
+ // Ask where to save credentials
1685
+ console.log('Where would you like to save your credentials?\n');
1686
+ console.log(' 1. This project only (./.linear)');
1687
+ console.log(' 2. Global, for all projects (~/.linear)');
1688
+ console.log('');
1689
+
1690
+ const locationChoice = await prompt('Enter number [1]: ') || '1';
1691
+ const saveGlobal = locationChoice === '2';
1692
+ console.log('');
1693
+
1694
+ // Explain and prompt before opening browser
1695
+ console.log('To authenticate, you\'ll need a Linear API key.');
1692
1696
  console.log(colors.gray('(Create a new personal API key if you don\'t have one)\n'));
1697
+ await prompt('Press Enter to open Linear\'s API settings in your browser...');
1693
1698
 
1694
1699
  openBrowser('https://linear.app/settings/api');
1695
1700
 
1696
- await new Promise(r => setTimeout(r, 1000));
1697
-
1701
+ console.log('');
1698
1702
  const apiKey = await prompt('Paste your API key: ');
1699
1703
 
1700
1704
  if (!apiKey) {
@@ -1869,8 +1873,7 @@ USAGE:
1869
1873
  linear <command> [options]
1870
1874
 
1871
1875
  AUTHENTICATION:
1872
- login [--global] Login and save credentials to .linear
1873
- --global, -g Save to ~/.linear instead of ./.linear
1876
+ login Login and save credentials to .linear
1874
1877
  logout Remove saved credentials
1875
1878
  whoami Show current user and team
1876
1879
 
@@ -17,12 +17,11 @@ linear login
17
17
  ```
18
18
 
19
19
  This will:
20
- 1. Open Linear API settings in your browser
21
- 2. Prompt you to paste your API key
22
- 3. Show available teams and let you pick one (or create a new team)
23
- 4. Save config to `./.linear`
24
-
25
- Use `--global` to save to `~/.linear` instead.
20
+ 1. Ask where to save credentials (project or global)
21
+ 2. Open Linear API settings in your browser
22
+ 3. Prompt you to paste your API key
23
+ 4. Show available teams and let you pick one (or create a new team)
24
+ 5. Save config to the chosen location
26
25
 
27
26
  ## Configuration
28
27
 
@@ -39,7 +38,6 @@ team=ISSUE
39
38
  ```bash
40
39
  # Auth
41
40
  linear login # Interactive setup
42
- linear login --global # Save to ~/.linear
43
41
  linear logout # Remove config
44
42
  linear whoami # Show current user/team
45
43
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dabble/linear-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Linear CLI with unblocked issue filtering, built for AI-assisted development",
5
5
  "type": "module",
6
6
  "bin": {