@b-clis/apt
v1.0.4
Published
Enchanted Package Manager - Professional CLI tool
Maintainers
Readme
APT CLI - Enchanted Package Manager
Professional TypeScript-based CLI package manager that communicates with the Enchanted server at https://enchanted-clis.vercel.app/.
Installation
npm install -g @b-clis/aptQuick Start
# Initialize a new APT project
apt init
# Install a package
apt install <package-name>
# List installed packages
apt list
# Show package information
apt info <package-name>
# Remove a package
apt remove <package-name> --force
# Push your project to the server
apt push
# Update existing package
apt push --update
# Update APT CLI itself
apt update
# Upgrade to specific version
apt upgrade 1.2.3Commands
apt init
Initialize APT project in the current directory. Creates a .apt folder with configuration.
Options:
-n, --name <name>- Set project name
Example:
apt init --name my-projectapt install <package>
Install a package from the Enchanted repository.
Options:
-f, --force- Force reinstall if already installed--skip-deps- Skip dependency installation
Example:
apt install my-package
apt install my-package --forceapt remove <package>
Remove an installed package from the system.
Options:
-f, --force- Skip confirmation prompt
Example:
apt remove my-package --forceapt list
List all installed packages with version and installation details.
Example:
apt listapt info <package> / apt show <package>
Display detailed information about a package, including version, description, dependencies, and update availability.
Example:
apt info my-package
apt show my-packageapt push
Push the current project to the Enchanted repository.
Options:
-u, --update- Update existing package (required if package already exists)-f, --force- Force push without confirmation
Example:
apt push
apt push --updateImportant: If a package with the same name already exists on the server, you must use the --update flag to update it. Otherwise, the command will fail with an error.
apt update
Update the APT CLI itself to the latest version from the server.
Example:
apt updateapt upgrade [target]
Upgrade APT CLI to a specific version or build.
Options:
-v, --version <version>- Specific version to upgrade to-b, --build <build>- Specific build to upgrade to
Example:
apt upgrade 1.2.3
apt upgrade --build nightlyConfiguration
When you run apt init, a .apt directory is created with the following structure:
.apt/
└── config.jsonconfig.json contains:
projectName- Name of your projectversion- Project versioninstalledPackages- List of installed packages with metadatacreatedAt- Project creation timestampupdatedAt- Last update timestamp
Development
Build the project
npm install
npm run buildLink for local testing
npm linkRun in development mode
npm run devPlatform Support
- Windows: Installs to
C:\EnchantedCLIs\<package-name> - Linux/macOS: Installs to
/usr/local/lib/enchanted/<package-name>
Note: For operations requiring elevated privileges, use the separate sudo CLI tool.
Technical Details
Installation Paths
Installation Paths
Packages are installed to platform-specific directories:
- Windows:
C:\EnchantedCLIs\<package-name> - Unix:
/usr/local/lib/enchanted/<package-name>
File permissions and elevated operations should be handled using the separate sudo CLI tool.
API Endpoints
The CLI communicates with the following API endpoints at https://enchanted-clis.vercel.app/:
GET /api/packages/:name- Get package informationGET /api/packages- List all packagesPOST /api/packages- Create new packagePUT /api/packages/:name- Update existing packageGET /api/cli/version- Get latest CLI version
License
MIT
Author
Enchanted CLIs Team
