The SQL Account CLI is a command-line tool designed to streamline the deployment, management, and exposure of the SQL Account Rest API application on Windows IIS. This tool automates common tasks such as deploying the application, setting up Cloudflare tunnels, and authenticating with SQL Account via REST API.
- Install: Deploy the SQL Account Rest API application to IIS effortlessly.
- Expose: Set up Cloudflare tunnels for secure remote access.
- Manage: Control SQL Account integration services through a simple interface.
- Automate: Simplify routine tasks such as authentication and application updates.
Before using this project, ensure the following are installed on your system:
-
Node.js (v18+)
- Download Node.js
- Follow the installation wizard for your operating system.
-
.NET 8 Hosting Bundle
- Download .NET 8 Hosting Bundle
- Choose the "Hosting Bundle" option to run .NET applications on IIS.
-
SQL Account
- Download SQL Account
- SQL Account must be installed and running on your system.
-
IIS (Internet Information Services)
- To enable IIS on Windows:
- Open Control Panel > Programs > Programs and Features.
- Click Turn Windows features on or off.
- Check the box for Internet Information Services and click OK.
- To enable IIS on Windows:
For usage, install the CLI globally using npm:
npm install -g sql-account
⚠️ Note: Ensure you run PowerShell as Administrator for the following installation steps.
This is essential to ensure the CLI has sufficient permissions to configure IIS and other system settings.
Below are the key commands available in the sql-account CLI:
-
Install
Deploy the SQL Account Rest API to IIS:sql-account install --app-dir <path-to-app-directory> --app-name <application-name>
--app-dir: Directory containing the application to deploy.--app-name: Name of the application to set up in IIS.
-
Expose
Create a secure Cloudflare tunnel for exposing the application:sql-account expose --provider <hostname> --secret <cloudflare-key>
--provider: Hostname to use for the Cloudflare tunnel.--secret: API key for authenticating with Cloudflare.
-
Login
Authenticate with SQL Account:sql-account login --username <your-username> --password <your-password>
--username: SQL Account username.--password: SQL Account password.
-
Help
View all available commands and options:sql-account --help
If you encounter issues while using SQL Account CLI, below is a list of common errors and solutions:
- System script blocking
Description: When running the command npm install -g sql-account, an error occurs related to script execution policy.
Cause: The current ExecutionPolicy does not allow running untrusted scripts.
Solution:
Check the current policy
Get-ExecutionPolicyUpdate the policy
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSignedRetry the installation command.
- Command 'cloudflared' not found
Description: When running the command to connect to a Cloudflare Tunnel, the CLI reports that the cloudflared command cannot be found.
Cause: Cloudflare Tunnel is not installed or is not in the system's PATH.
Solution:
Download Cloudflare Tunnel from here.
Ensure the cloudflared executable is accessible by adding its directory to the PATH environment variable.
For local development:
- Clone or download the project.
- Navigate to the project directory using a terminal.
- Install the required dependencies:
npm install
- Build and link the package for local usage:
npm run build npm link
This project is implemented and maintained by the HexaSync Team.
- Fork and Contribute: You are welcome to fork the repository, implement your features, and submit a pull request for review.
- File a Ticket: If you encounter any issues, please file a ticket on the GitHub repository.
- Contact Support: Reach out to our team at support@hexasync.com.
This project is open-source. Contributions are highly encouraged!