You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何配置OSX系统下Hyper.is终端默认启动至桌面目录?

Set Hyper.is Default Startup Directory to Desktop on macOS

Absolutely! You can easily configure Hyper.is to launch directly into your Desktop folder instead of the root directory on macOS. Here's a straightforward step-by-step guide:

Step 1: Open Hyper's Configuration File

  • The fastest way is to use the keyboard shortcut Cmd + , while Hyper is open—this will bring up the .hyper.js config file in your default editor.
  • Alternatively, you can manually locate the file in your user directory (~/.hyper.js). If you don't see hidden files, press Cmd + Shift + . in Finder to reveal them.

Step 2: Add/Modify the workingDirectory Setting

In the config section of the .hyper.js file, look for the workingDirectory key. If it doesn't exist, add it to the config object. Use this universal path that works for any macOS user:

module.exports = {
  config: {
    // ... keep all your existing config options here
    workingDirectory: `${process.env.HOME}/Desktop`,
    // ... keep other config options here
  },
  // ... rest of the config file
};

This uses the HOME environment variable to dynamically point to your user folder, so you don't have to hardcode your username.

Step 3: Save and Restart Hyper

Save the changes to .hyper.js, then close and reopen Hyper. You'll now land directly in your Desktop directory every time you launch the app.

Alternative: Shell Configuration (If You Prefer)

If you want this behavior across all terminal instances (not just Hyper), you can add cd ~/Desktop to your shell's startup file:

  • For zsh (default on newer macOS versions), edit ~/.zshrc
  • For bash, edit ~/.bash_profile or ~/.bashrc
    Add the line cd ~/Desktop at the end, save, and restart your terminal. Note this will affect all terminal apps, not just Hyper.

内容的提问来源于stack exchange,提问作者Josh Pittman

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 07:14:56