# CustomGPT CLI
[![PyPI version](https://badge.fury.io/py/customgpt-cli.svg)](https://badge.fury.io/py/customgpt-cli)
[![Python Support](https://img.shields.io/pypi/pyversions/customgpt-cli.svg)](https://pypi.org/project/customgpt-cli/)
[![Documentation Status](https://readthedocs.org/projects/customgpt-cli/badge/?version=latest)](https://customgpt-cli.readthedocs.io/en/latest/?badge=latest)
[![Coverage Status](https://codecov.io/gh/yourusername/customgpt-cli/branch/main/graph/badge.svg)](https://codecov.io/gh/yourusername/customgpt-cli)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Docker Pulls](https://img.shields.io/docker/pulls/yourusername/customgpt-cli.svg)](https://hub.docker.com/r/yourusername/customgpt-cli)
🚀 A powerful command-line interface for CustomGPT SDK, enabling efficient project management and automation.
## ✨ Features
- 🛠️ Full CustomGPT SDK integration
- 🔐 Secure API key management
- 📊 Project management and monitoring
- 🤖 Conversation handling
- 📄 Page management
- 🐳 Docker support
- 🔄 Bulk operations
- 📊 Advanced filtering
## Installation
```bash
pip install customgpt-cli
```
## Authentication
The CLI requires your CustomGPT API key. You can provide it in two ways:
1. Environment Variable (recommended):
```bash
export CUSTOMGPT_API_KEY=your_api_key
customgpt-cli list-projects
```
2. Command Line Argument:
```bash
customgpt-cli --api-key YOUR_API_KEY list-projects
```
Note: Command line argument takes precedence over environment variable if both are set.
## Usage
### Project Management
Create a project:
```bash
# Using environment variable
export CUSTOMGPT_API_KEY=your_api_key
# With a sitemap, return project ID
customgpt-cli create-project --name "My Test Project With Sitemap" --sitemap "https://adorosario.github.io/small-sitemap.xml" --format id-only
# With a file, returning JSON output.
customgpt-cli create-project --name "My Test Project With File" --file /path/to/file.pdf --format json
```
List projects with filtering:
```bash
# Basic listing
customgpt-cli list-projects
# Filter by name pattern (supports regex)
customgpt-cli list-projects --name-filter "test.*project"
# Filter by activity
customgpt-cli list-projects --inactive-days 30
# Filter by query count
customgpt-cli list-projects --min-queries 100 --max-queries 1000
# Change output format
customgpt-cli list-projects --format json
customgpt-cli list-projects --format table
customgpt-cli list-projects --format id-only
```
Show a project details:
```bash
customgpt-cli show-project --project-id PROJECT_ID --format json
```
Update a project:
```bash
customgpt-cli update-project --project-id PROJECT_ID --name "New Name" --is-shared 1 --format json
```
Delete projects:
```bash
# Delete single project
customgpt-cli delete-projects --project-ids PROJECT_ID
# Delete multiple projects
customgpt-cli delete-projects --project-ids "id1,id2,id3"
# Delete (with dry run)
customgpt-cli delete-projects --project-ids PROJECT_ID --dry-run
# Force delete without confirmation
customgpt-cli delete-projects --project-ids PROJECT_ID --force
```
### Conversation Management
Create a conversation:
```bash
customgpt-cli create-conversation --project-id PROJECT_ID --name "My Conversation"
```
Send a message:
```bash
# Without streaming
customgpt-cli send-message --project-id PROJECT_ID --session-id SESSION_ID --prompt "Hello"
# With streaming
customgpt-cli send-message --project-id PROJECT_ID --session-id SESSION_ID --prompt "Hello" --stream
# With custom persona
customgpt-cli send-message --project-id PROJECT_ID --session-id SESSION_ID --prompt "Hello" --persona "You are a helpful assistant"
```
### Page Management
Get project pages:
```bash
customgpt-cli get-pages --project-id PROJECT_ID
```
Delete a page:
```bash
customgpt-cli delete-page --project-id PROJECT_ID --page-id PAGE_ID
```
Reindex a page:
```bash
customgpt-cli reindex-page --project-id PROJECT_ID --page-id PAGE_ID
```
## Scripting Examples
Here is an examples of how to use the CLI in scripts:
1. Export project IDs to a file and process them:
```bash
#!/bin/bash
export CUSTOMGPT_API_KEY=your_api_key
# Export IDs
customgpt-cli list-projects --name-filter "test" --format id-only > projects.txt
# Process the IDs
customgpt-cli delete-projects --project-ids $(paste -s -d, projects.txt) --force
```
## Output Formats
The CLI supports multiple output formats for better integration with other tools:
- `table`: Human-readable formatted table (default)
- `json`: JSON format for parsing
- `csv`: CSV format for stats data
- `id-only`: Just the IDs, one per line (good for scripting)
## Safety Features
The CLI includes several safety features:
- `--dry-run`: Shows what would be deleted without actually deleting
- Confirmation prompts for destructive operations
- `--force` flag to skip confirmations in scripts
- Error handling with informative messages
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
MIT License
Raw data
{
"_id": null,
"home_page": "https://customgpt.ai",
"name": "customgpt-cli",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": "ai, agent, cli, automation, enterprise",
"author": "CustomGPT Team",
"author_email": "support@customgpt.ai",
"download_url": "https://files.pythonhosted.org/packages/d5/a9/d488071d6209c813c4f99ab2288352a205cdc85f72578fe42bbad1f23d01/customgpt_cli-0.1.2.tar.gz",
"platform": null,
"description": "# CustomGPT CLI\n\n[![PyPI version](https://badge.fury.io/py/customgpt-cli.svg)](https://badge.fury.io/py/customgpt-cli)\n[![Python Support](https://img.shields.io/pypi/pyversions/customgpt-cli.svg)](https://pypi.org/project/customgpt-cli/)\n[![Documentation Status](https://readthedocs.org/projects/customgpt-cli/badge/?version=latest)](https://customgpt-cli.readthedocs.io/en/latest/?badge=latest)\n[![Coverage Status](https://codecov.io/gh/yourusername/customgpt-cli/branch/main/graph/badge.svg)](https://codecov.io/gh/yourusername/customgpt-cli)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Docker Pulls](https://img.shields.io/docker/pulls/yourusername/customgpt-cli.svg)](https://hub.docker.com/r/yourusername/customgpt-cli)\n\n\ud83d\ude80 A powerful command-line interface for CustomGPT SDK, enabling efficient project management and automation.\n\n## \u2728 Features\n\n- \ud83d\udee0\ufe0f Full CustomGPT SDK integration\n- \ud83d\udd10 Secure API key management\n- \ud83d\udcca Project management and monitoring\n- \ud83e\udd16 Conversation handling\n- \ud83d\udcc4 Page management\n- \ud83d\udc33 Docker support\n- \ud83d\udd04 Bulk operations\n- \ud83d\udcca Advanced filtering\n\n## Installation\n\n```bash\npip install customgpt-cli\n```\n\n## Authentication\n\nThe CLI requires your CustomGPT API key. You can provide it in two ways:\n\n1. Environment Variable (recommended):\n```bash\nexport CUSTOMGPT_API_KEY=your_api_key\ncustomgpt-cli list-projects\n```\n\n2. Command Line Argument:\n```bash\ncustomgpt-cli --api-key YOUR_API_KEY list-projects\n```\n\nNote: Command line argument takes precedence over environment variable if both are set.\n\n## Usage\n\n### Project Management\n\nCreate a project:\n```bash\n# Using environment variable\nexport CUSTOMGPT_API_KEY=your_api_key\n\n# With a sitemap, return project ID\ncustomgpt-cli create-project --name \"My Test Project With Sitemap\" --sitemap \"https://adorosario.github.io/small-sitemap.xml\" --format id-only\n\n# With a file, returning JSON output. \ncustomgpt-cli create-project --name \"My Test Project With File\" --file /path/to/file.pdf --format json\n```\n\nList projects with filtering:\n```bash\n# Basic listing\ncustomgpt-cli list-projects\n\n# Filter by name pattern (supports regex)\ncustomgpt-cli list-projects --name-filter \"test.*project\"\n\n# Filter by activity\ncustomgpt-cli list-projects --inactive-days 30\n\n# Filter by query count\ncustomgpt-cli list-projects --min-queries 100 --max-queries 1000\n\n# Change output format\ncustomgpt-cli list-projects --format json\ncustomgpt-cli list-projects --format table\ncustomgpt-cli list-projects --format id-only\n```\n\nShow a project details: \n```bash\ncustomgpt-cli show-project --project-id PROJECT_ID --format json\n```\n\nUpdate a project:\n```bash\ncustomgpt-cli update-project --project-id PROJECT_ID --name \"New Name\" --is-shared 1 --format json\n```\n\nDelete projects:\n```bash\n# Delete single project\ncustomgpt-cli delete-projects --project-ids PROJECT_ID\n\n# Delete multiple projects\ncustomgpt-cli delete-projects --project-ids \"id1,id2,id3\"\n\n# Delete (with dry run)\ncustomgpt-cli delete-projects --project-ids PROJECT_ID --dry-run\n\n# Force delete without confirmation\ncustomgpt-cli delete-projects --project-ids PROJECT_ID --force\n```\n\n### Conversation Management\n\nCreate a conversation:\n```bash\ncustomgpt-cli create-conversation --project-id PROJECT_ID --name \"My Conversation\"\n```\n\nSend a message:\n```bash\n# Without streaming\ncustomgpt-cli send-message --project-id PROJECT_ID --session-id SESSION_ID --prompt \"Hello\"\n\n# With streaming\ncustomgpt-cli send-message --project-id PROJECT_ID --session-id SESSION_ID --prompt \"Hello\" --stream\n\n# With custom persona\ncustomgpt-cli send-message --project-id PROJECT_ID --session-id SESSION_ID --prompt \"Hello\" --persona \"You are a helpful assistant\"\n```\n\n### Page Management\n\nGet project pages:\n```bash\ncustomgpt-cli get-pages --project-id PROJECT_ID\n```\n\nDelete a page:\n```bash\ncustomgpt-cli delete-page --project-id PROJECT_ID --page-id PAGE_ID\n```\n\nReindex a page:\n```bash\ncustomgpt-cli reindex-page --project-id PROJECT_ID --page-id PAGE_ID\n```\n\n## Scripting Examples\n\nHere is an examples of how to use the CLI in scripts:\n\n1. Export project IDs to a file and process them:\n```bash\n#!/bin/bash\nexport CUSTOMGPT_API_KEY=your_api_key\n\n# Export IDs\ncustomgpt-cli list-projects --name-filter \"test\" --format id-only > projects.txt\n\n# Process the IDs\ncustomgpt-cli delete-projects --project-ids $(paste -s -d, projects.txt) --force\n```\n\n## Output Formats\n\nThe CLI supports multiple output formats for better integration with other tools:\n\n- `table`: Human-readable formatted table (default)\n- `json`: JSON format for parsing\n- `csv`: CSV format for stats data\n- `id-only`: Just the IDs, one per line (good for scripting)\n\n## Safety Features\n\nThe CLI includes several safety features:\n\n- `--dry-run`: Shows what would be deleted without actually deleting\n- Confirmation prompts for destructive operations\n- `--force` flag to skip confirmations in scripts\n- Error handling with informative messages\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nMIT License",
"bugtrack_url": null,
"license": null,
"summary": "No-code AI agent creation platform for enterprise knowledge automation",
"version": "0.1.2",
"project_urls": {
"Homepage": "https://customgpt.ai",
"Repository": "https://github.com/customgpt/customgpt-cli"
},
"split_keywords": [
"ai",
" agent",
" cli",
" automation",
" enterprise"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "37753484a5b4c0d851714c874fa2f6791ecf1fe62bf04f5818d545d647e57985",
"md5": "82802d105d197bc14426f1f274f32614",
"sha256": "c72d75c632f3b4fe6f110728d468c5618667ef30746579f79462b68721283f5e"
},
"downloads": -1,
"filename": "customgpt_cli-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "82802d105d197bc14426f1f274f32614",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 33697,
"upload_time": "2024-12-08T22:42:37",
"upload_time_iso_8601": "2024-12-08T22:42:37.775933Z",
"url": "https://files.pythonhosted.org/packages/37/75/3484a5b4c0d851714c874fa2f6791ecf1fe62bf04f5818d545d647e57985/customgpt_cli-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d5a9d488071d6209c813c4f99ab2288352a205cdc85f72578fe42bbad1f23d01",
"md5": "d333a9f7637127ec9da2bed8d4329fa0",
"sha256": "a2526d03e70bfc17c9d8c4a818e1815cdd659c246550b713d7d520fe34fa61ea"
},
"downloads": -1,
"filename": "customgpt_cli-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "d333a9f7637127ec9da2bed8d4329fa0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 34274,
"upload_time": "2024-12-08T22:42:40",
"upload_time_iso_8601": "2024-12-08T22:42:40.479985Z",
"url": "https://files.pythonhosted.org/packages/d5/a9/d488071d6209c813c4f99ab2288352a205cdc85f72578fe42bbad1f23d01/customgpt_cli-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-08 22:42:40",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "customgpt",
"github_project": "customgpt-cli",
"github_not_found": true,
"lcname": "customgpt-cli"
}