How to Try Mainstream LLMs for Free: A Practical Guide to Setting Up a Terminal AI Assistant
Learn how to install and authorize a terminal-based AI assistant, verify free model access, and use DeepSeek, GLM, and other mainstream open-source models for coding, troubleshooting, scripting, and everyday technical questions. The guide also covers security considerations, usage tips, and common troubleshooting steps.
1. Background and Motivation
As large language models (LLMs) become more deeply integrated into software engineering, more developers want AI assistance directly within their local development environments. Common use cases include code completion, technical explanations, script generation, and error analysis. Compared with opening separate chat pages in a browser, connecting AI capabilities to the terminal shortens the distance between asking a question and receiving an answer.
Many platforms offer limited-time promotions or free usage quotas, allowing developers to try mainstream open-source models such as the DeepSeek and GLM series at no cost. These offers lower the barrier to experimentation and are especially useful for:
- Individual developers and students: People without an enterprise budget who want to evaluate the tools before paying;
- Technical teams comparing models: Teams that need to switch between multiple models in one environment and compare their results;
- Command-line-focused engineers: Developers who prefer completing tasks in the terminal rather than constantly switching between applications.
2. Why Use AI in the Terminal?
Better Workflow Integration
Developers spend a significant amount of time in the terminal. Git operations, build scripts, and log analysis are often performed there. If AI assistance is available in the same environment, questions such as “What does this command do?” or “How can I fix this error?” can be answered without leaving the current context.
Faster Input and Response
For developers who are comfortable with keyboard-driven workflows, describing a problem in the terminal can be faster than using a web interface. It is also easier to include command output, logs, and other contextual information directly in the prompt.
Easier Programmatic Composition
Terminal AI assistants often support pipelines and scripted usage. For example, you can pass a section of logs to a model for classification and summarization, or feed model output into a subsequent script. This type of workflow is more difficult to implement through a typical web chat interface.
3. Environment Preparation
Before getting started, confirm the following prerequisites:
- Operating system: Windows 10 or Windows 11 users can use PowerShell to run the installation script. macOS and Linux users can typically use the corresponding shell script or package manager, depending on the tool’s official documentation.
- Network access: Installation requires downloading a script from a remote repository, so make sure the relevant resource is reachable from your network.
- Account: Register an account with the relevant platform in advance. The authorization process will generally open a web page for sign-in and approval.
- PowerShell execution policy: If PowerShell blocks the script, you can temporarily allow script execution for the current process by using an administrator session. Restore the default policy after installation to avoid leaving security settings unnecessarily permissive.
The following is a representative installation flow using an environment variable for an invitation code and a remotely hosted installation script:
# 1. Set an environment variable if an invitation code or access code is required$env:MY_INVITE_CODE='your-invitation-code'# 2. Download and execute the installation scriptirm https://<installation-script-address> | iex
irm, an alias for Invoke-WebRequest, downloads the script text, while iex, an alias for Invoke-Expression, executes it in the current session. If you are concerned about security, download the script to a local file first, review its contents, and then run it. This is a good practice when using command-line installation scripts.
4. Initialization and Authorization
1. Start the Tool
After installation, enter the tool’s executable name in the terminal and press Enter to launch the interactive AI interface. The first startup usually displays a welcome message and a brief setup guide.
2. Complete Account Authorization
Once inside the interactive interface, you will usually need to run a login command, often in a slash-command format such as /login. The tool should open a browser-based authorization page. After you approve access, the terminal session will be linked to your account, and any model access included in the applicable promotion or free tier can be activated.
This process generally follows a standard OAuth-style device authorization flow. The terminal creates a one-time authorization request, the browser completes identity verification, and the terminal receives the necessary access credentials. You do not need to manually copy an API key, which also provides a more secure authorization experience.
3. Verify Available Model Access
After authorization, open the platform’s usage or entitlement page and confirm the available quota and model list. Free offers may provide different tiers, for example:
- Lite: A basic quota intended for most users, suitable for everyday questions and coding assistance;
- Pro: A higher tier that may require additional activity or contribution requirements and may include stronger models or a larger quota. Most individual users do not need to focus on this tier initially.
Once the entitlement is active and the available model list matches your expectations, you can begin using the assistant. If access is not activated immediately, check that the browser account is the same account used for the offer, then wait briefly and refresh the page.
5. Getting Started: Chat with the Model
Return to the terminal and enter a natural-language question. Typical use cases include:
- General technical questions: Ask the model to explain concepts or compare approaches, such as the main differences between HTTP/2 and HTTP/3.
- Coding assistance: Request function scaffolding, unit-test examples, or refactoring suggestions for an existing code sample.
- Error diagnosis: Paste an error stack trace into the terminal and ask the model to identify possible causes and recommend troubleshooting steps.
- Script generation: Describe a task and ask the model to produce a first draft in PowerShell, Bash, or Python, then review it yourself before execution.
Usage Recommendations
- Include sufficient context in your prompt, such as the programming language version, runtime environment, and desired outcome. This can significantly improve response quality.
- Always review model output, especially when it involves file deletion, permission changes, system configuration, or other sensitive operations. Do not execute such commands without human verification.
- If the results are unsatisfactory, try another available model. Different models may perform better on coding tasks or natural-language questions, and comparing them can help you identify the best fit for your workflow.
6. Common Troubleshooting Steps
- The installation script fails: Check network connectivity and the PowerShell execution policy. You can also download the script manually, review it, and execute it locally.
- Entitlements do not appear after authorization: Confirm that the browser is signed in to the expected account and check whether the offer is still active.
- Requests are rate-limited or the quota is exhausted: Free access commonly includes request-rate and total-usage limits. This is expected behavior. Try using the service at a different time or review the platform’s quota documentation.
- Responses stop unexpectedly or time out: Long responses may occasionally time out. Break the request into several smaller questions and run them separately.
7. Summary
With a four-step process—installation, terminal authorization, entitlement verification, and direct conversation—developers can usually set up a terminal AI assistant within minutes and try models such as DeepSeek and GLM without an initial cost.
The main benefit is workflow integration: AI becomes part of the terminal environment, reducing the need to switch between tools. For teams, this also provides a low-cost starting point for evaluating which models best match their workloads. Running real tasks with available free quotas first can help inform later decisions about enterprise inference services or private deployment, allowing technical choices to be based on measured results rather than specifications alone.
