hire-ai 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl

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.
hire/commands/ask.py CHANGED
@@ -14,13 +14,32 @@ from ..session import (
14
14
  )
15
15
 
16
16
 
17
+ def read_stdin() -> str | None:
18
+ """Read from stdin if available (pipe/redirect)."""
19
+ if sys.stdin.isatty():
20
+ return None
21
+ content = sys.stdin.read()
22
+ return content.strip() if content else None
23
+
24
+
25
+ def build_message(message: str | None, stdin: str | None) -> str | None:
26
+ """Build the final message from args and stdin."""
27
+ if message and stdin:
28
+ return f"{message}\n\n--- stdin ---\n{stdin}"
29
+ elif stdin:
30
+ return stdin
31
+ else:
32
+ return message
33
+
34
+
17
35
  VALID_TARGETS = {"claude", "codex", "gemini"}
18
36
 
19
37
 
20
38
  def run_ask(args: Namespace) -> int:
21
39
  """Run the ask command."""
22
40
  target = args.target
23
- message = args.message
41
+ arg_message = args.message
42
+ stdin_content = read_stdin()
24
43
  continue_session = getattr(args, "continue_session", False)
25
44
  session_id = args.session
26
45
  name = args.name
@@ -28,11 +47,14 @@ def run_ask(args: Namespace) -> int:
28
47
  output_json = args.json
29
48
 
30
49
  # Handle case where target is actually the message (when target is omitted)
31
- # e.g., "delegate 'message'" -> target='message', message=None
32
- if target and target not in VALID_TARGETS and message is None:
33
- message = target
50
+ # e.g., "hire 'message'" -> target='message', message=None
51
+ if target and target not in VALID_TARGETS and arg_message is None:
52
+ arg_message = target
34
53
  target = None
35
54
 
55
+ # Build final message from args and stdin
56
+ message = build_message(arg_message, stdin_content)
57
+
36
58
  # Load config for defaults
37
59
  from ..config import load_config
38
60
  config = load_config()
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hire-ai
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: CLI to orchestrate AI agents (Claude, Codex, Gemini)
5
- Project-URL: Homepage, https://github.com/nichiki/hire
6
- Project-URL: Repository, https://github.com/nichiki/hire
7
- Project-URL: Issues, https://github.com/nichiki/hire/issues
5
+ Project-URL: Homepage, https://github.com/nichiki/hire-ai
6
+ Project-URL: Repository, https://github.com/nichiki/hire-ai
7
+ Project-URL: Issues, https://github.com/nichiki/hire-ai/issues
8
8
  Author: nichiki
9
9
  License-Expression: MIT
10
10
  License-File: LICENSE
@@ -15,12 +15,13 @@ Classifier: Intended Audience :: Developers
15
15
  Classifier: License :: OSI Approved :: MIT License
16
16
  Classifier: Operating System :: OS Independent
17
17
  Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
18
19
  Classifier: Programming Language :: Python :: 3.11
19
20
  Classifier: Programming Language :: Python :: 3.12
20
21
  Classifier: Programming Language :: Python :: 3.13
21
22
  Classifier: Topic :: Software Development
22
23
  Classifier: Topic :: Utilities
23
- Requires-Python: >=3.11
24
+ Requires-Python: >=3.10
24
25
  Provides-Extra: dev
25
26
  Requires-Dist: build>=1.0; extra == 'dev'
26
27
  Requires-Dist: mypy>=1.10; extra == 'dev'
@@ -29,29 +30,37 @@ Requires-Dist: ruff>=0.4; extra == 'dev'
29
30
  Requires-Dist: twine>=5.0; extra == 'dev'
30
31
  Description-Content-Type: text/markdown
31
32
 
32
- # hire
33
+ # hire-ai
33
34
 
34
35
  CLI to orchestrate AI agents (Claude, Codex, Gemini).
35
36
 
37
+ > **⚠️ Warning**: By default, all agents run in **auto-approve mode**:
38
+ > - Claude Code: `--dangerously-skip-permissions`
39
+ > - Codex: `--full-auto`
40
+ > - Gemini CLI: `-y`
41
+ >
42
+ > This means agents can execute commands and modify files without confirmation.
43
+ > You can customize this in `~/.config/hire/config.json`.
44
+
36
45
  ## Installation
37
46
 
38
47
  ```bash
39
48
  # Using pipx (recommended)
40
- pipx install hire
49
+ pipx install hire-ai
41
50
 
42
51
  # Using pip
43
- pip install hire
52
+ pip install hire-ai
44
53
 
45
- # Using Homebrew
46
- brew install nichiki/tap/hire
54
+ # Using Homebrew (macOS)
55
+ brew install nichiki/tap/hire-ai
47
56
  ```
48
57
 
49
58
  ## Prerequisites
50
59
 
51
60
  You need at least one of the following CLI tools installed:
52
61
 
53
- - [Claude CLI](https://docs.anthropic.com/claude-code)
54
- - [Codex CLI](https://github.com/openai/codex)
62
+ - [Claude Code](https://claude.ai/claude-code)
63
+ - [Codex](https://github.com/openai/codex)
55
64
  - [Gemini CLI](https://github.com/google-gemini/gemini-cli)
56
65
 
57
66
  ## Usage
@@ -70,6 +79,15 @@ hire -s SESSION_ID "Follow up question"
70
79
  hire -n my-project codex "Start designing the architecture"
71
80
  hire -s my-project "What about the database schema?"
72
81
 
82
+ # Pipe input
83
+ cat main.py | hire codex "Review this code"
84
+ git diff | hire claude "Explain these changes"
85
+ echo "What is 2+2?" | hire gemini
86
+
87
+ # Attach files (using @filepath - agent feature)
88
+ hire claude "Review @src/main.py for security issues"
89
+ hire codex "Explain @package.json and @tsconfig.json"
90
+
73
91
  # Output as JSON
74
92
  hire gemini "Summarize this" --json
75
93
 
@@ -9,12 +9,12 @@ hire/adapters/claude.py,sha256=tM7G25jGqinjK_7QjtF_N0E089V9p1dzNReXJnq0VO4,1929
9
9
  hire/adapters/codex.py,sha256=_4MXGTz-0YujuutDVCliaj9P94bm-Z1yNEElRtN3wzA,2895
10
10
  hire/adapters/gemini.py,sha256=Qm_e1zzhxu2ooXANfFvVCwzxteVatlbDnBZeuf-jHNw,2613
11
11
  hire/commands/__init__.py,sha256=sp3kdLPcKmqqgh_PyiOyDxJeHhnCHw0GIaoHWccgSCk,204
12
- hire/commands/ask.py,sha256=tsM3VK3i06zTQgb0iEAXX97_13b9bHVyX8Ju7dV369g,4490
12
+ hire/commands/ask.py,sha256=xulYwVyI6pAoGiaOQnQNfW5-fbTTiGyVnDVKH7cBRmA,5130
13
13
  hire/commands/delete.py,sha256=1fLZ64xmyIzR5s7i7lsNe-WornsD_qsOAe1cCdOodDU,991
14
14
  hire/commands/sessions.py,sha256=aIsh8oC4N3KtMeUdIrCvU3hONMxAfV_Z4qnprBiP62k,1073
15
15
  hire/commands/show.py,sha256=gztFedJ553fvru0dPbHyperOMXDew-Yri3E3APu9d3c,860
16
- hire_ai-0.1.0.dist-info/METADATA,sha256=FCFDGQIV4XBQ7ZhLCHq9hlJ6HRP2nahzJw3ievV3y9s,3151
17
- hire_ai-0.1.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
18
- hire_ai-0.1.0.dist-info/entry_points.txt,sha256=oq7wq8Ju9C2Lw79ljxSkQIaeKOHA_aIN9JKQAaDbz_Q,39
19
- hire_ai-0.1.0.dist-info/licenses/LICENSE,sha256=Hj8NYmaOGk4xCcCYqD_5U91CVJwcJXEFSMWS965dUI0,1064
20
- hire_ai-0.1.0.dist-info/RECORD,,
16
+ hire_ai-0.1.1.dist-info/METADATA,sha256=4kt_ZpwWcQJtJJAn_ksgN9IEYS1ROUfsyb60FtZPr4M,3828
17
+ hire_ai-0.1.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
18
+ hire_ai-0.1.1.dist-info/entry_points.txt,sha256=oq7wq8Ju9C2Lw79ljxSkQIaeKOHA_aIN9JKQAaDbz_Q,39
19
+ hire_ai-0.1.1.dist-info/licenses/LICENSE,sha256=Hj8NYmaOGk4xCcCYqD_5U91CVJwcJXEFSMWS965dUI0,1064
20
+ hire_ai-0.1.1.dist-info/RECORD,,