cardinal-ai 0.2.10 → 0.2.11

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 946e61403c6624f73d9ec439f536c8fb8cf2b2f1b1fca371e0fefb5f7c4e054b
4
- data.tar.gz: f183a370982f4deb6e4b158f72dbf25cd23252563424ed593752c5c2505c5c79
3
+ metadata.gz: d84dde8c38e1b5d9819430f36789358dcccd571d7889c36555156a8fbf882172
4
+ data.tar.gz: 69720ca8ec6c5ad490d863d9fabe4636ef67f465fa028fe2d27c2949ed9ccb86
5
5
  SHA512:
6
- metadata.gz: 68234ba5c060c9e1601099d5865e278f0f347ae8733d7dc4fc55c1d3f9fdfc8e6c9557bb076be5a68f450be20bc3b72d592f80bd37778a83b92915b4ddb6bd5c
7
- data.tar.gz: fff0c846ab54f0cfccd43ba75311b74441d1b89a93e8ce88eb6726571cd22dd23d084d27ffbbeac7fa159d6df1e48d1e51b1cf8f729636a822ddbc7e56dda999
6
+ metadata.gz: e3d7f706dbab0ec9b06a22ee2fa547ded9690b45b2faeb0e3582b78dc893ba7599ae9c5ada2fd5e9e6b88b11f1445dbc2528c76fd4cbe2879e413761af8a82b7
7
+ data.tar.gz: 722fd734f542aed1c45af13226a8d233af66b0dc47e719f3b5efc85b02b0917e80e7bbb5239399bc326b814877d7af044ec3b3af8214e780b59f6a15503e119f
data/README.md CHANGED
@@ -20,6 +20,18 @@ merged. You never leave the board.
20
20
  gem install cardinal-ai
21
21
  ```
22
22
 
23
+ **If `cardinal` says "command not found" afterwards:** on many systems (Arch, Fedora,
24
+ any install without sudo) gems land in a per-user folder your shell doesn't look in —
25
+ the install output even warns about it, easy to miss. Add it to your PATH once:
26
+
27
+ ```sh
28
+ # bash / zsh — add to ~/.bashrc or ~/.zshrc:
29
+ export PATH="$(ruby -e 'puts Gem.user_dir')/bin:$PATH"
30
+
31
+ # fish — run once, it sticks:
32
+ fish_add_path (ruby -e 'puts Gem.user_dir')/bin
33
+ ```
34
+
23
35
  ## Use it
24
36
 
25
37
  Go to any project and start Cardinal (a brand-new folder is fine — it offers to
@@ -33,6 +45,9 @@ cardinal
33
45
  The first time, a browser window asks **which Claude account this board should work as** —
34
46
  pick one, and it's remembered for this project only. Then open **http://localhost:4000**.
35
47
 
48
+ Running boards on two projects at once? Give the second one its own port:
49
+ `cardinal 4001` (or `-p 4001`).
50
+
36
51
  That's the whole setup. Now:
37
52
 
38
53
  1. **Add a card** for something you want done, in plain English.
data/exe/cardinal CHANGED
@@ -4,6 +4,7 @@
4
4
  # cardinal — spin up a Cardinal AI board for the repo you're standing in.
5
5
  #
6
6
  # cardinal # or `cardinal up` — first run links a Claude account
7
+ # cardinal 4001 # same, on a different port (also: -p/--port 4001)
7
8
  # cardinal login # redo the account link (switch accounts)
8
9
  # cardinal logout # unlink this instance's account
9
10
  #
@@ -22,7 +23,24 @@ TOKEN_FILE = File.join(AUTH_DIR, "oauth-token")
22
23
  def say(msg) = puts("cardinal ▸ #{msg}")
23
24
  def die(msg) = abort("cardinal: #{msg}")
24
25
 
25
- cmd = ARGV[0] || "up"
26
+ # Port: `cardinal 4001`, `-p 4001`, `--port 4001`, or `--port=4001`.
27
+ # Explicit choice beats the PORT env var; default (4000) is applied later.
28
+ args = ARGV.dup
29
+ port = nil
30
+ if (i = args.index("-p") || args.index("--port"))
31
+ args.delete_at(i)
32
+ port = args.delete_at(i) or die("#{ARGV[i]} needs a port number")
33
+ elsif (flag = args.find { |a| a.start_with?("--port=") })
34
+ args.delete(flag)
35
+ port = flag.split("=", 2).last
36
+ elsif (bare = args.find { |a| a.match?(/\A\d+\z/) })
37
+ args.delete(bare)
38
+ port = bare
39
+ end
40
+ die "invalid port: #{port}" if port && !port.match?(/\A\d+\z/)
41
+ ENV["PORT"] = port if port
42
+
43
+ cmd = args[0] || "up"
26
44
  unless File.directory?(File.join(TARGET, ".git"))
27
45
  # A brand-new project shouldn't need ceremony — cards are branches and PRs,
28
46
  # so a repo must exist, but Cardinal can lay that rail itself.
@@ -47,7 +65,7 @@ when "login"
47
65
  FileUtils.rm_f(TOKEN_FILE)
48
66
  when "up" # continue
49
67
  else
50
- die "usage: cardinal [up|login|logout]"
68
+ die "usage: cardinal [up|login|logout] [-p PORT]"
51
69
  end
52
70
 
53
71
  # Hide .cardinal/ from the host repo without touching its .gitignore.
@@ -1,3 +1,3 @@
1
1
  module Cardinal
2
- VERSION = "0.2.10"
2
+ VERSION = "0.2.11"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cardinal-ai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.10
4
+ version: 0.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Ellis