百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
F

fix

> 编程语言
开源

修复它

99 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

修复它

Fix it!

Fix it is a little pet project that corrects simple errors we do sometimes in console commands.

It is a sameless copy of the amazing project TheFuck, but written in c# and made for Windows.

Examples:

Fixing git commands

Typos

C:\dev\fix>git statu
git: 'statu' is not a git command. See 'git --help'.

The most similar commands are
        status
        stage
        stash

C:\dev\fix>fix
C:\dev\fix>git status
On branch main
Your branch is up to date with 'origin/main'.
...

Forgeting to set upstream

C:\dev\fix>git push
fatal: The current branch main has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin main

C:\dev\fix>fix
C:\dev\fix>git push --set-upstream origin main
...

Fixing DOS commands

Typo from dri to dir

C:\dev\fix>dri /o /b
'dri' is not recognized as an internal or external command,
operable program or batch file.

C:\dev\fix>fix
C:\dev\fix>dir /o /b
.github
Fix
Fix.Tests
...

Fixing Azure CLI commands

Simple Typo

C:\dev>az vm lisr
'lisr' is misspelled or not recognized by the system.
Did you mean 'list' ?

Examples from AI knowledge base:
az vm list
List all VMs.

https://aka.ms/cli_ref
Read more about the command in reference docs

C:\dev>fix
C:\dev>az vm list
...

Login needed

C:\dev>az vm list
User [email protected] does not exist in MSAL token cache. Run `az login`.

C:\dev>fix
C:\dev>az login
...

Requirements

  • Windows only (sorry!)
  • Dotnet 5.0 installed

Instalation

  • Just copy the fix.exe file to your path.

Switches

  • fix.exe -debug : shows debug information.
  • fix.exe -plan : only shows the fixed command but doesn't execute it.

Is this some kind of evil magic? How does it work?

Thanks to some code written by Jim Mischel in 2006, we are able to access native Windows APIs responsible to get hold of the Console active buffer via c# (P/Invoke).

From there, we go up the buffer until we find the last typed command (check ActionManager class method GetLastCommand).

Then we pass the last command and lines returned by it as input to all the registered "CommandFixers". The first one who can understand and fix the error returns a solution and our tool then executes the new command. When none of them can do the job, we say I'm sorry ;)

There, you fixed!

Got you, how do I contribute with a new Fix?

Check it out here: Contribution guidelines for this project

WARNING!

Use this on your own risk! We are not responsible for any damage this little tool might cause to your machine. Fix it will execute commands in your console, so check the source code to understand what these might be.

License MIT

Project License can be found here.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C#

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言