How can I script in KiCad to hide all component values and only show their references?
To hide all component values and only show their references in KiCad using Python scripting, you can use a script that iterates through each module (component) and adjusts their visibility settings. The provided script demonstrates this:

```python
#!/usr/bin/env python2.7
import sys
from pcbnew import *

filename=sys.argv[1]

pcb = LoadBoard(filename)
for module in pcb.GetModules():
    print "* Module: %s"%module.GetReference()
    module.Value().SetVisible(False)      # set Value as Hidden
    module.Reference().SetVisible(True)   # set Reference as Visible

pcb.Save("mod_"+filename)
```

This script is useful for PCB designs where only the reference designators are needed to be visible, often for clarity or in preparation for manufacturing.