please-cli 0.1.0 → 0.1.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
@@ -113,7 +113,7 @@ The shell wrapper is required for commands to execute in your current shell. It:
113
113
  3. Adds the command to shell history
114
114
  4. Executes it with `eval`
115
115
 
116
- See `scripts/ask.sh` (Bash/Zsh) and `scripts/ask.ps1` (PowerShell) for reference implementations.
116
+ See `pls --install` for automatic installation.
117
117
 
118
118
  ## Tech Stack
119
119
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "please-cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "AI-powered shell command assistant",
5
5
  "type": "module",
6
6
  "main": "dist/cli.js",
@@ -10,7 +10,6 @@
10
10
  },
11
11
  "files": [
12
12
  "dist",
13
- "scripts",
14
13
  "README.md",
15
14
  "LICENSE.md"
16
15
  ],
package/scripts/ask.ps1 DELETED
@@ -1,35 +0,0 @@
1
- # please-cli wrapper function for PowerShell
2
- # Add this to your $PROFILE
3
-
4
- function pls {
5
- # Set environment variable to indicate running through wrapper
6
- $env:ASK_CLI_WRAPPER = "1"
7
-
8
- # Run the CLI with all arguments
9
- & bun run "C:\Users\Umut\Projects\shell-helper\src\cli.ts" @args
10
-
11
- # Check if a command was approved
12
- $tempFile = Join-Path $HOME ".ai_cmd_temp"
13
- if (Test-Path $tempFile) {
14
- $cmd = Get-Content $tempFile -Raw
15
- Remove-Item $tempFile
16
-
17
- if ($cmd) {
18
- # Add to PSReadLine history if available
19
- if (Get-Command Add-History -ErrorAction SilentlyContinue) {
20
- Add-History -CommandLine $cmd
21
- }
22
-
23
- # Also try PSConsoleReadLine for better history integration
24
- try {
25
- [Microsoft.PowerShell.PSConsoleReadLine]::AddToHistory($cmd)
26
- }
27
- catch {
28
- # PSReadLine not available or failed
29
- }
30
-
31
- # Execute the command
32
- Invoke-Expression $cmd
33
- }
34
- }
35
- }
package/scripts/ask.sh DELETED
@@ -1,37 +0,0 @@
1
- #!/bin/bash
2
- # please-cli wrapper function for Bash/Zsh
3
- # Add this to your ~/.bashrc or ~/.zshrc
4
-
5
- pls() {
6
- # Path to the please-cli binary
7
- local PLEASE_CLI_PATH="$HOME/.config/please-cli/bin/please"
8
-
9
- # If not installed globally, use local bun run
10
- if [[ ! -f "$PLEASE_CLI_PATH" ]]; then
11
- PLEASE_CLI_PATH="bun run /path/to/please-cli/src/index.ts"
12
- fi
13
-
14
- # Run the CLI with all arguments
15
- $PLEASE_CLI_PATH "$@"
16
-
17
- # Check if a command was approved
18
- if [[ -f ~/.ai_cmd_temp ]]; then
19
- local cmd
20
- cmd=$(cat ~/.ai_cmd_temp)
21
- rm ~/.ai_cmd_temp
22
-
23
- if [[ -n "$cmd" ]]; then
24
- # Add to shell history
25
- if [[ -n "$ZSH_VERSION" ]]; then
26
- # Zsh
27
- print -s "$cmd"
28
- elif [[ -n "$BASH_VERSION" ]]; then
29
- # Bash
30
- history -s "$cmd"
31
- fi
32
-
33
- # Execute the command
34
- eval "$cmd"
35
- fi
36
- fi
37
- }