@cli4ai/lib
Advanced tools
+28
| # @cli4ai/lib | ||
| > Official @cli4ai package • https://cli4ai.com • Install c4ai: `npm i -g c4ai` | ||
| Shared CLI framework used by `@cli4ai/*` tool packages (env loading, JSON output, consistent errors). | ||
| ## Setup | ||
| ```bash | ||
| npm i @cli4ai/lib | ||
| ``` | ||
| ## Usage | ||
| ```ts | ||
| import { cli, output, withErrorHandling, env } from '@cli4ai/lib/cli.ts'; | ||
| const program = cli('mytool', '1.0.0', 'Example tool'); | ||
| program | ||
| .command('hello') | ||
| .action(withErrorHandling(async () => { | ||
| const name = env('NAME'); | ||
| output({ hello: name }); | ||
| })); | ||
| program.parse(); | ||
| ``` |
+1
-1
| { | ||
| "name": "@cli4ai/lib", | ||
| "version": "1.0.1", | ||
| "version": "1.0.2", | ||
| "description": "Shared CLI framework for c4ai tools", | ||
@@ -5,0 +5,0 @@ "author": "cliforai", |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
10401
5.58%3
50%0
-100%29
Infinity%