What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

The safest pattern is to keep the key out of your repository and command line, then make it available only to the OpenCode process that needs it. For one developer, use OpenCode’s supported authentication commands, a protected environment variable, or a permission-restricted file outside the project. For teams and CI, use a secrets manager that can issue scoped credentials at runtime, record access, and support rapid rotation.

Never put a real key in opencode.json, source control, shell startup files, command history, logs, prompts, or copied transcripts. If a key appears in any of those places, revoke it and create a replacement.

Choose the storage method by your operating situation

There is no single “secure location” for every CLI. The right choice depends on who needs the credential, whether the command runs interactively or in CI, and how quickly you must revoke or audit access.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Method Where the value rests How it reaches the CLI Best fit Main limitation
OpenCode saved account OpenCode’s server SQLite database, normally ~/.local/share/opencode/opencode.db; XDG_DATA_HOME, release channel, or OPENCODE_DB can change the location OpenCode reads the account after login One developer using a provider interactively Anyone who can access the local user account and database may be able to use the credential; team auditing is limited
Environment variable The process environment and whatever can observe that process Injected by a launcher, CI secret store, keychain integration, or vault Short-lived local sessions, automation, and headless jobs Environment values can leak through debugging, crash reports, child processes, or misconfigured logs
Protected file substitution A file outside the repository, such as ~/.secrets/openai-key OpenCode reads the file through {file:path} Local development when a file is necessary The file remains a plaintext secret unless the operating system or a secret store protects it
Managed vault or CI secret manager Centralized encrypted storage controlled by policy Runtime injection, often through a short-lived service identity Multiple users, environments, and production automation Requires setup, access policy, and operational maintenance

For a personal workstation, start with OpenCode’s own login flow or a protected runtime variable. Move to a vault when several people, repositories, or deployment environments need the same provider access.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.

Use OpenCode’s supported authentication flow first

OpenCode documents four provider credential methods: API key, OAuth, command, and environment. API-key, OAuth, and command logins create saved accounts. Environment credentials are read from the server process and are not saved as accounts.

Log in without editing internal files

  1. Run opencode auth login and follow the provider-specific prompts.
  2. Check the available connections with opencode auth list.
  3. If several saved accounts exist, select the intended one with opencode auth switch.
  4. When access is no longer required, remove a saved account with opencode auth logout.

OpenCode also supports its /connect command from an interactive session. Use these interfaces instead of editing the SQLite database, changing rows by hand, or copying tokens into configuration files.

Know where saved credentials live

OpenCode says saved API keys and OAuth tokens are stored in a server SQLite database. The usual local path is ~/.local/share/opencode/opencode.db, but the actual path can differ when XDG_DATA_HOME, the release channel, or OPENCODE_DB is configured. Treat the database and its parent directories as sensitive: keep the operating-system account protected, avoid placing the data directory on an untrusted shared volume, and include it in your local backup and device-access review.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do not assume that knowing the path makes manual inspection safe. Database copies, backups, filesystem snapshots, and support bundles can all become additional credential copies. Use OpenCode’s commands for account management and protect the host that runs the server.

Understand account precedence

A saved account takes precedence over an environment connection for the same integration. This can make a correctly injected variable appear to be ignored. If OpenCode is using an unexpected identity, run opencode auth list, identify the saved account for that provider, and switch or log out of it before testing the environment-based connection.

Environment connections can appear in opencode auth list, but opencode auth logout cannot remove them because they are not saved accounts. Remove or change the variable in the launcher, shell, service configuration, CI secret store, or vault that supplied it.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Keep keys out of opencode.json with substitutions

OpenCode configuration supports environment and file substitutions. These let you commit a non-secret configuration template while the real value stays outside it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Environment substitution

{
  "provider": {
    "openai": {
      "options": {
        "apiKey": "{env:OPENAI_API_KEY}"
      }
    }
  }
}

The literal key is not in the JSON file. A launcher, password manager, CI system, or vault must set OPENAI_API_KEY before the OpenCode server starts. Restrict the variable to the process that needs it whenever possible rather than adding it permanently to a global shell profile.

File substitution

{
  "provider": {
    "openai": {
      "options": {
        "apiKey": "{file:~/.secrets/openai-key}"
      }
    }
  }
}

OpenCode documents {env:VARIABLE_NAME} and {file:path}. Relative paths resolve from the configuration-file directory. Absolute paths can begin with / or ~. A file reference keeps the value out of opencode.json, but it does not secure the file automatically.

Protect a local secret file

On a Unix-like system, create the directory and file outside the repository, make the file readable only by your account, and ensure the file contains only the key with no diagnostic text:

mkdir -p ~/.secrets
chmod 700 ~/.secrets
printf '%sn' 'REPLACE_WITH_YOUR_KEY' > ~/.secrets/openai-key
chmod 600 ~/.secrets/openai-key
  • Do not put ~/.secrets inside a synchronized project folder or shared drive.
  • Do not commit the file, add it to an archive, or paste its contents into an issue or chat.
  • Check ownership and permissions after restoring a backup or moving to a new machine.
  • Use your organization’s approved encrypted store instead of a local file when several people or systems need access.

Inject credentials only for the process that needs them

Runtime injection reduces how long a secret is present and avoids writing it into a script. It is a transport mechanism, not a vault: the operating system, parent process, child processes, debugging tools, and logs still need protection.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

One-off private OpenCode server

OpenCode documents starting a standalone server with a provider variable:

Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
ANTHROPIC_API_KEY=REPLACE_WITH_YOUR_KEY opencode --standalone

Do not replace the placeholder with a real key in a command that will be saved to shell history or copied into documentation. Have a secret manager or protected launcher supply the value, or set it in a controlled session and clear it when the process ends.

Shared background service

For OpenCode’s shared background server, set a provider variable with:

opencode service set env NAME VALUE

Remove it with:

opencode service unset env NAME

Use these commands only from a trusted account and be aware that the service’s configuration becomes another place requiring access control. Verify the resulting connection with opencode auth list. If you later change to a saved account, remember that the saved account can override the environment connection for that provider.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Prevent command-line and process-list exposure

Command-line arguments are often visible to other users through process inspection and may be recorded by wrappers or monitoring tools. Prefer an environment variable supplied by a secret manager, a protected file reference, or standard input supported by the specific CLI. Avoid commands shaped like tool --api-key REAL_SECRET, and never enable verbose or debug output until you know it redacts authorization headers and request bodies.

Use a vault for teams, CI, and production

A managed vault or CI secret manager becomes worthwhile when credentials are shared across people or environments. It should provide more than encrypted storage.

Required controls

  • Least privilege: create provider credentials with only the APIs, projects, rate limits, and spending limits required for the job.
  • Separation: use different credentials for personal work, team development, staging, and production so one leak does not cross environments.
  • Short lifetime: prefer short-lived tokens or dynamic credentials when the provider supports them.
  • Audit trail: record which identity retrieved a secret, from where, and when.
  • Service identities: give CI a dedicated account restricted to the vault entries and repositories it needs.
  • Rotation: make replacement routine and test that applications can reload the new value without a long outage.
  • Revocation: provide an immediate way to disable a compromised key and identify every consumer that used it.

A concrete runtime pattern

  1. Store the provider key in the vault under an environment-specific name.
  2. Give a developer or CI service identity read access only to that entry.
  3. At job start, authenticate the identity using the platform’s approved method.
  4. Inject the value into the OpenCode process as OPENAI_API_KEY or the provider variable OpenCode expects.
  5. Run OpenCode without printing the environment or command arguments.
  6. Revoke the identity or expire the lease when the job ends if the platform supports ephemeral access.

One implementation is 1Password’s CLI: its op run command resolves secret references for a child process, while op read and op inject support scripts and configuration templates. Its documentation also describes shell plugins and service accounts restricted to selected vaults. The important property is the pattern—resolve at execution time without putting plaintext in source—not the particular product.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.

Apply the same design to other CLI tools

AWS, Git hosting, cloud, database, and vendor CLIs differ in variable names and login commands, but the security model is the same:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Commit only a template containing variable names or secret references.
  2. Retrieve the real value from an approved vault, password manager, OS keychain, or CI secret store.
  3. Inject it into the smallest possible process scope.
  4. Run the command without echoing the value, request headers, or configuration dump.
  5. Clear temporary files and revoke or rotate credentials when exposure is suspected.

GitGuardian’s command-line guidance states: “Never enter or store passwords, API keys or any other secrets in plaintext.” That includes scripts, README examples, issue comments, terminal recordings, and generated troubleshooting bundles. A placeholder such as REPLACE_WITH_YOUR_KEY is safe for documentation; a real-looking value is not.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Close the common leakage paths

Git repositories and backups

Use pre-commit secret scanning and repository push protection where available, but treat scanners as a last line of defense. A key that was committed remains in clone directories, forks, object databases, pull-request caches, and backups even after the visible line is deleted. Revoke it first, then remove the exposed material from repository history according to your platform’s procedure.

Shell history

Inline assignments, command arguments, and pasted scripts can be retained in history files or terminal synchronization services. Do not paste a real key into a command. Use a vault-backed launcher, an interactive prompt that does not echo, or a protected environment setup that is not recorded. Review history after an accidental paste and rotate the credential rather than relying on deletion alone.

Logs, diagnostics, and process inspection

Disable request-body and header logging for authenticated calls. Check that error handlers redact authorization headers and environment values. Be cautious with set -x, shell tracing, CI “print environment” steps, crash dumps, and support archives. Restrict access to the host and to tools that can inspect another process’s environment.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

AI prompts and transcripts

Do not paste keys into an AI prompt, terminal transcript, ticket, or screen recording—even when asking for help debugging authentication. Replace the value with a placeholder and include only the variable name, error class, provider, and non-sensitive configuration. If a transcript already contains a key, treat it as compromised and rotate it.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

Rotate and recover after exposure

  1. Revoke immediately: disable the provider key or token in the provider’s console or identity system.
  2. Assess the scope: identify repositories, logs, transcripts, machines, CI jobs, and people that may have seen it.
  3. Inspect usage: review provider activity, spending, and access logs for unexpected requests.
  4. Replace it: create a new credential with narrower permissions, separate environment scope, and appropriate limits.
  5. Update consumers: change the vault entry, CI secret, protected file, or OpenCode account through the supported interface.
  6. Remove copies: clean repositories, temporary files, logs, and shared documents, while recognizing that deletion does not undo prior access.
  7. Verify: run opencode auth list, test the intended provider, and confirm the old credential no longer works.

Rotation should be scheduled according to the risk of the provider and environment, not postponed until an incident. Production and high-spend credentials deserve tighter scopes, shorter lifetimes, and more frequent review than disposable development keys.

Troubleshoot an OpenCode credential safely

OpenCode uses the wrong account

Run opencode auth list. A saved account may be taking precedence over the environment variable. Use opencode auth switch or opencode auth logout for the saved account, then retry without printing the key.

The environment connection is missing

Confirm that the variable is set in the same server process that runs OpenCode, not only in a different terminal. Check the provider variable’s spelling and restart the standalone or background server after changing it. Environment connections are not removable with auth logout; change the launcher or service environment instead.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A file substitution fails

Check whether the path is relative to the configuration-file directory, whether ~ expands to the intended account, and whether the OpenCode server can read the file. Confirm that the file contains only the expected value and that permissions do not grant access to unrelated users. Do not solve a permissions error by making the file world-readable.

CI works locally but fails headlessly

Ensure the CI identity can read the specific secret, the variable is exported to the OpenCode child process, and no interactive OAuth step is required. Prefer a service account or short-lived token designed for automation. Keep diagnostic output limited to variable names and status codes, never values or full authenticated requests.

A practical policy for an individual developer

  • Use opencode auth login for an interactive provider account when local account protection is acceptable.
  • Use {env:NAME} when a launcher or secret manager can inject the value for one process.
  • Use {file:~/.secrets/name} only for a necessary local file, with account-only permissions and no repository synchronization.
  • Keep separate credentials for personal, work, development, and production use.
  • Never put real values in code, command arguments, history, logs, prompts, or transcripts.
  • Review provider usage and rotate credentials after any suspected disclosure.

A practical policy for teams

  • Use a centralized vault or CI secret manager rather than sharing files or copying keys between developers.
  • Grant read access through named users and restricted service accounts, not a common team password.
  • Record retrievals and review them for unusual locations or times.
  • Set provider-level budgets, scopes, and environment boundaries.
  • Document the revoke-and-replace procedure and test it before an incident.
  • Keep OpenCode configuration in source control only as a non-secret template using substitutions.

OpenCode’s own commands are the safest way to manage saved accounts, while environment and file substitutions provide a clean boundary between configuration and value. A vault adds the controls needed when that boundary must work across people, machines, and automated pipelines.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.